/* -*- C++ -*- */


inline jost::Value*
jost::Object::get_field(const std::string& field)
  throw(jost::UnknownField) 
{
  ValueMap_t::iterator elem = this->field_map_.find(field);
  if (elem == this->field_map_.end())
    throw jost::UnknownField("The Object field \"" + 
			     field + 
			     "\" does not exist.");
  return elem->second;
}

inline jost::Value* 
jost::Object::set_field(const std::string& name, jost::Value* value) throw()
{
  return (this->field_map_[name] = value);
}


inline jost::Object::iterator 
jost::Object::begin() throw() {
  return this->field_map_.begin();
}


inline jost::Object::iterator 
jost::Object::end() throw() {
  return this->field_map_.end();
}


inline jost::Object::const_iterator 
jost::Object::begin() const throw() {
  return this->field_map_.begin();
}


inline jost::Object::const_iterator 
jost::Object::end() const throw() {
  return this->field_map_.end();
}
